<h2><?php echo $dataProperty['Property']['name_eng'] ?></h2>

<ul class="nav nav-pills">
    <li role="presentation" class="<?php echo $projectTypeId==NULL?'active':''?>">
        <?php
        echo $this->Html->link('All', '/AdminProjects/index/'.$dataProperty['Property']['id'], array(
            'escape' => false,
            'title' => '',
            'class' => ''
        ));
        ?>
    </li>
     <li role="presentation" class="<?php echo $projectTypeId==TYPE_NEW?'active':''?>">
        <?php
        echo $this->Html->link('New Project', '/AdminProjects/index/'.$dataProperty['Property']['id'].'/'.TYPE_NEW, array(
            'escape' => false,
            'title' => '',
            'class' => ''
        ));
        ?>
    </li>
     <li role="presentation" class="<?php echo $projectTypeId==TYPE_RESALE?'active':''?>">
        <?php
        echo $this->Html->link('Resale Project', '/AdminProjects/index/'.$dataProperty['Property']['id'].'/'.TYPE_RESALE, array(
            'escape' => false,
            'title' => '',
            'class' => ''
        ));
        ?>
    </li>
    <li role="presentation" class="">
        <?php
        echo $this->Html->link('<i class="glyphicon glyphicon-plus"></i> Create New Project', '', array(
            'escape' => false,
            'title' => '',
            'class' => ''
        ));
        ?>
    </li>
</ul>
<table class="table table-hover">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Type</th>
            <th>Owner</th>
            <th>Create Date</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        <?php $i = 1; ?>
        <?php //debug($dataProjectArr);?>
        <?php foreach ($dataProjectArr as $p): ?>
            <tr>
                <td><?php echo $i ?></td>
                <td>
                    <?php
                    echo $this->Html->link($p['ProjectDetail'][0]['title'], '', array(
                        'escape' => false,
                        'title' => 'View ' . $p['ProjectDetail'][0]['title'],
                        'class' => ''
                    ));
                    ?>
                </td>
                <td><?php echo $p['PropertyType']['name_eng'] ?></td>
                <td><?php echo $p['User']['username'] ?></td>
                <td><?php echo $p['Project']['created'] ?></td>
                <td>
                    <?php
                    echo $this->Html->link('<i class="glyphicon glyphicon-pencil"></i>', '', array(
                        'escape' => false,
                        'title' => 'Edit',
                        'class' => ''
                    ));
                    ?>
                    &nbsp;
                    <?php
                    echo $this->Html->link('<i class="glyphicon glyphicon-trash"></i>', '', array(
                        'escape' => false,
                        'title' => 'Delete',
                        'class' => ''
                    ));
                    ?>
                </td>
            </tr>
            <?php $i++; ?>
        <?php endforeach; ?>
    </tbody>
</table>